package test;

public class Check{
	/*******************************************************************************
	 * Software: CheckInit.java
	 * Version:  1.0
	 * Date:     Feb 14, 2010 11:53:58 AM
	 * Author:   
	 * License:  none specified yet.
	 *
	 * PURPOSE:
	 *	should check if an variable is initialized or not. but does not work that way... because when passing an uninitialized
	 *variable to a function java throws an error. 
	 * REQUIREMENTS WHAT ELSE IS NEEDED:
	 * TODO:
	 * FEATURES:
	 *******************************************************************************/

	static boolean init(byte BYTE)
	{
        // causes compile error if not explicitly initialized
        try
        {
        	System.out.println("Local variable " + BYTE + " is initialized.");
        	return true;
        }
        catch (Exception e) {
			// TODO: handle exception
        	System.out.println("Local variable " + BYTE +" uninitalized, Error thrown: "+e);
        	return false;
		}
    }
	
	static boolean init(short SHORT)
	{
		// causes compile error if not explicitly initialized
		try
		{
			System.out.println("Local variable " + SHORT + " is initialized.");
			return true;
		}
		catch (Exception e) {
			// TODO: handle exception
			System.out.println("Local variable " + SHORT +" uninitalized, Error thrown: "+e);
			return false;
		}
	}
	
	static boolean init(long LONG)
	{
		// causes compile error if not explicitly initialized
		try
		{
			System.out.println("Local variable " + LONG + " is initialized.");
			return true;
		}
		catch (Exception e) {
			// TODO: handle exception
			System.out.println("Local variable " + LONG +" uninitalized, Error thrown: "+e);
			return false;
		}
	}
	
	static boolean init(float FLOAT)
	{
		// causes compile error if not explicitly initialized
		try
		{
			System.out.println("Local variable " + FLOAT + " is initialized.");
			return true;
		}
		catch (Exception e) {
			// TODO: handle exception
			System.out.println("Local variable " + FLOAT +" uninitalized, Error thrown: "+e);
			return false;
		}
	}
	
	static boolean init(boolean BOOLEAN)
	{
		// causes compile error if not explicitly initialized
		try
		{
			System.out.println("Local variable " + BOOLEAN + " is initialized.");
			return true;
		}
		catch (Exception e) {
			// TODO: handle exception
			System.out.println("Local variable " + BOOLEAN +" uninitalized, Error thrown: "+e);
			return false;
		}
	}
	
	static boolean init(char CHAR)
	{
		// causes compile error if not explicitly initialized
		try
		{
			System.out.println("Local variable " + CHAR + " is initialized.");
			return true;
		}
		catch (Exception e) {
			// TODO: handle exception
			System.out.println("Local variable " + CHAR +" uninitalized, Error thrown: "+e);
			return false;
		}
	}

    public static void main(String[] args) {
    }
}
